<extend name="Index/base"/>
<block name="main">
    <section class="section main">
        <div class="clearfix con-main" id="mainContainer">
            <div class="con-left">
                <div class="panel" id="siderBox">
                    <ul class="switch-section">
                        <li><a href="{:U('/show/'.$doc['id'])}"><span class="icon-left"></span> 返回文档</a></li>
                        <if condition="$doc['bid']">
                            <li><a href="//bbs.wooo.wang/{$doc['bid']}"><span class="icon-right"></span> 进入社区</a></li>
                        </if>
                        <li><a href="{:U('/set/'.$doc['id'])}"><span class="icon-setting"></span> 设置文档</a></li>
                        <li><a href="{:U('/hide/'.$doc['id'])}"><span class="icon-eye"></span> 隐藏文档</a></li>
                        <li><a href="{:U('/freeze/'.$doc['id'])}" class="red"><span class="icon-alert"></span> 冻结文档</a></li>
                    </ul>
                </div>
            </div>
            <div class="con-right">
                <div class="panel other">
                    <div class="panel-header">
                        <h1 class="topic-title">冻结文档<span class="icon-sum" id="toggleBtn" onclick="$('#mainContainer').toggleClass('toggle-side-mark');"></span></h1>
                        <p class="topic-info">
                            <a href="//doc.wooo.wang/show/{$doc['id']}">{$doc['name']}</a> • 将文档冻结，冻结状态下的文档将无法被任何人编辑查看！
                        </p>
                    </div>
                    <div class="panel-body">
                        <div class="other-content">
                            <form action="{:U('/freeze/'.$doc['id'])}" method="post">
                                <p><strong>文档冻结之后，将不可浏览！不可编辑！</strong></p><br>
                                <p>冻结之后，可解冻文档，解冻文档需要花费贡献度，具体规则如下：</p><br>
                                <ul class="unfreeze-gx">
                                    <li>如果团体（或私人，下同）当前拥有 0 份非冻结文档，则需花费 1 点贡献度进行解冻；</li>
                                    <li>如果当前拥有 1 份非冻结文档，则需花费 10 点贡献度进行解冻；</li>
                                    <li>如果当前拥有 2 份非冻结文档，则需花费 100 点贡献度进行解冻；</li>
                                    <li>如果当前拥有 3 份或 3 份以上非冻结文档，则需花费 1000 点贡献度进行解冻；</li>
                                </ul>
                                <if condition="$doc.status eq -1">
                                    <br>
                                    <p>解冻本文档需要花费：<strong class="red">{$needgx}</strong>点贡献度！</p>
                                    <input type="hidden" name="status" value="0">
                                    <button class="deleteBook">确认解冻文档 !?</button>
                                <else/>
                                    <input type="hidden" name="status" value="-1">
                                    <button class="deleteBook">确认冻结文档 !?</button>
                                </if>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</block>